package com.henrich.ccb.utils;

/**
 * <p>功能描述：英文星期与中文星期映射 </p>
 * <p>修订记录</p>
 *
 * @Author xianghui.zh
 * @Version 1.0 2022/2/17
 **/
public enum WeekDay {
    MONDAY("MONDAY", "星期一"),
    TUESDAY("TUESDAY", "星期二"),
    WEDNESDAY("WEDNESDAY", "星期三"),
    THURSDAY("THURSDAY", "星期四"),
    FRIDAY("FRIDAY", "星期五"),
    SATURDAY("SATURDAY", "星期六"),
    SUNDAY("SUNDAY", "星期日");


    private String ea;
    private String cn;

    WeekDay(String ea, String cn) {
        this.ea = ea;
        this.cn = cn;
    }

    public static String getCNByEA(String ea) {
        String value = "";
        WeekDay[] values = values();
        for (WeekDay v : values) {
            if (v.ea == ea) {
                value = v.cn;
            }
        }
        return value;
    }
}
